<script>
    function goBack(){
    window.history.back()
    }

</script>
<div class="container-fluid">
  <h3 style="color:#8C525B;border-bottom:1px solid #F1F1F1;padding-bottom:10px;padding-left:10px;">员工信息</h3>
  <div class="panel panel-default">
    <div class="panel-heading">
      <p class="panel-title" style="height:35px;line-height:35px">
        添加员工信息
        <a href="e_action.php?action=add" class="btn btn-info pull-right">添加</a>
      </p>
    </div>
    <div class="panel-body">
      <form class="form-horizontal" style="margin-top:20px;" action="e_action.php?action=<?php if(isset($res)){
        echo 'update_check&e_id='.$res['e_id'];
      }
      else{
        echo 'add_check';
      }?>" method="post" accept-charset="utf-8" >
        <div class="form-group">
          <label for="" class="col-sm-2 control-label" >姓名</label>
          <div class="col-sm-9">
            <input required="required" type="text" class="form-control"  placeholder="姓名" name='name' value="<?php if(isset($res)){echo $res['e_name'];}?>">
          </div>
        </div>
        <div class="form-group">
          <label for="" class="col-sm-2 control-label" >性别</label>
          <div class="col-sm-9">
            <input required="required" type="text" class="form-control" placeholder="性别" name='sex' value="<?php if(isset($res)){echo $res['e_sex'];}?>">
          </div>
        </div>
        <div class="form-group">
          <label for="" class="col-sm-2 control-label" >年龄</label>
          <div class="col-sm-9">
            <input required="required" type="text" class="form-control" placeholder="年龄" name='age' value="<?php if(isset($res)){echo $res['e_age'];}?>">
          </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label" >电话</label>
            <div class="col-sm-9">
              <input required="required" type="text" class="form-control" placeholder="电话" name='tel' value="<?php if(isset($res)){echo $res['e_tel'];}?>">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label" >邮箱</label>
            <div class="col-sm-9">
              <input required="required" type="email" class="form-control" placeholder="邮箱" name='email' value="<?php if(isset($res)){echo $res['e_email'];}?>">
            </div>
        </div>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-10">
            <button class="btn btn-primary" id="submit_btn" type="submit">提交</button>
            <button class="btn btn-info" type="reset">重置</button>
            <a class="btn btn-default" onclick="goBack()">返回</a>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>



